package xjy.smartcommunity.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;

import xjy.smartcommunity.R;

/**
 * Created by victorzhang on 2017/9/13.
 */

public class SettingActivity extends AppCompatActivity {
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                finish();
                return true;
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_settinglist);

        getSupportActionBar().setHomeButtonEnabled(true);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);//启用返回按钮
    }
    public void infoBtnOnClick(View view) {
        Intent intent = new Intent(this,PersonalInfoActivity.class);
        startActivity(intent);
    }

    public void passwordBtnOnClick(View view){
        Intent intent = new Intent(this,PaswChActivity.class);
        startActivity(intent);
    }
}